package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.core.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.TbRoomOrderMapper;
import com.ruoyi.system.domain.TbRoomOrder;
import com.ruoyi.system.service.ITbRoomOrderService;

/**
 * 房间订单Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-07-11
 */
@Service
public class TbRoomOrderServiceImpl implements ITbRoomOrderService 
{
    @Autowired
    private TbRoomOrderMapper tbRoomOrderMapper;

    /**
     * 查询房间订单
     * 
     * @param id 房间订单主键
     * @return 房间订单
     */
    @Override
    public TbRoomOrder selectTbRoomOrderById(Long id)
    {
        return tbRoomOrderMapper.selectTbRoomOrderById(id);
    }

    /**
     * 查询房间订单列表
     * 
     * @param tbRoomOrder 房间订单
     * @return 房间订单
     */
    @Override
    public List<TbRoomOrder> selectTbRoomOrderList(TbRoomOrder tbRoomOrder)
    {
        return tbRoomOrderMapper.selectTbRoomOrderList(tbRoomOrder);
    }

    /**
     * 新增房间订单
     * 
     * @param tbRoomOrder 房间订单
     * @return 结果
     */
    @Override
    public int insertTbRoomOrder(TbRoomOrder tbRoomOrder)
    {
        tbRoomOrder.setCreateTime(DateUtils.getNowDate());
        return tbRoomOrderMapper.insertTbRoomOrder(tbRoomOrder);
    }

    /**
     * 修改房间订单
     * 
     * @param tbRoomOrder 房间订单
     * @return 结果
     */
    @Override
    public int updateTbRoomOrder(TbRoomOrder tbRoomOrder)
    {
        return tbRoomOrderMapper.updateTbRoomOrder(tbRoomOrder);
    }

    /**
     * 批量删除房间订单
     * 
     * @param ids 需要删除的房间订单主键
     * @return 结果
     */
    @Override
    public int deleteTbRoomOrderByIds(Long[] ids)
    {
        return tbRoomOrderMapper.deleteTbRoomOrderByIds(ids);
    }

    /**
     * 删除房间订单信息
     * 
     * @param id 房间订单主键
     * @return 结果
     */
    @Override
    public int deleteTbRoomOrderById(Long id)
    {
        return tbRoomOrderMapper.deleteTbRoomOrderById(id);
    }
}
